"""
model name : aihw
file       : node.py
information:
    author : OuYang
    time   : 2025/10/10
"""


class Node:
    def __init__(self, x, y, w):
        self.x = x
        self.y = y
        self.w = w

        self.g = float('inf')
        self.h = float(0)
        self.f = float('inf')
        self.parent = None

    def __lt__(self, other):
        return self.f < other.f

    def __eq__(self, other):
        return self.x == other.x and self.y == other.y

    def __hash__(self):
        return hash((self.x, self.y))

    def __repr__(self):
        return f"Node({self.x}, {self.y}, {self.w})"
